package com.spoto.oa.service;

import java.sql.SQLException;
import java.util.List;

import com.spoto.oa.model.Employee;

/**
 * 
 * @Project_name: OA
 * @Description: 员工信息管理模块的操作
 * @Author: LinYiSong
 * @Version: 
 * @Date: 2010-9-25~2010-9-25
 */
public interface EmployeeServ {

	/**
	 * 添加用户
	 * @param employee
	 * @throws SQLException 
	 */
	public void addEmployee(Employee employee) throws SQLException;
	/**
	 * 根据模糊员工账号查找员工
	 * @param employee
	 */
	public List<Employee> searchByUserName(String username);
	/**
	 * 根据员工账号查找员工
	 * @param employee
	 */
	public Employee getByUserName(String username);
	/**
	 * 取得冲突的数据
	 * @param username
	 * @return
	 */
	public Employee getByUserNameConfict(String username);
	/**
	 * 根据员工姓名查找员工
	 * @param username
	 * @return
	 */
	public List<Employee> searchByName(String name);
	

	/**
	 * 删除指定的员工
	 * @param employee
	 */
	public void deleteEmployee(Employee employee);
	
	/**
	 * 删除冲突的员工
	 * @param employee
	 */
	public void deleteEmployeeConfict(Employee employee);
	/**
	 * 修改员工
	 * @param employee
	 */
	public void updateEmployee(Employee employee);
	
	/**
	 * 取得所有的员工信息
	 * @return
	 */
	public List<Employee> getAllEmployees();
	
	/**
	 * 取得所有冲突的员工信息
	 * @return
	 */
	public List<Employee> getAllEmployeesConfict();
	
	/**
	 * 添加发生冲突的员工
	 * @param e
	 * @throws SQLException 
	 */
	public void addEmployeeConfict(Employee e) throws SQLException;
	/**
	 * 根据员工共帐号删除员工
	 * @param string
	 */
	public void deleteEmployeeByUsername(String string);
	/**
	 * 根据qq模糊查询
	 * @param qq
	 * @return
	 */
	public List<Employee> searchByQq(String qq);
	/**
	 * 根据手机号模糊查询
	 * @param cell
	 * @return
	 */
	public List<Employee> searchByCell(String cell);
	
	/**
	 * 修改用户密码
	 * @param username
	 * @param psw
	 */
	public void editPsw(String username,String psw);
}
